import Router from "koa-router";
import {
  getTypeList,
  createType,
  deleteType,
} from "../controller/legends.controller.js";
import { legendsTypeVerification } from "../middleware/legends.middleware.js";
const router = new Router({
  prefix: "/legends",
});

router.get("/list", async (ctx) => {
  ctx.body = "Hello Legends";
});

/// 获取分类列表
router.get("/typeList", getTypeList);
// 创建分类列表
router.post("/addType", legendsTypeVerification, createType);
// 删除分类
router.delete("/deleteType/:id", deleteType);

export default router;
